part of '../service.dart';

class _PurchaseOfferSourceDto extends Equatable {
  const _PurchaseOfferSourceDto._internal({
    required this.purchaseOfferSourceString,
  });

  final String purchaseOfferSourceString;

  @override
  List<Object?> get props {
    return [
      purchaseOfferSourceString,
    ];
  }

  factory _PurchaseOfferSourceDto.fromEntity(PurchaseOfferSource purchaseOfferSource) {
    final purchaseOfferSourceString = switch (purchaseOfferSource) {
      PurchaseOfferSource.dailyLimitCard => 'daily limit card',
      PurchaseOfferSource.purchasePage => 'purchase page',
    };

    return _PurchaseOfferSourceDto._internal(
      purchaseOfferSourceString: purchaseOfferSourceString,
    );
  }

  @override
  String toString() {
    return purchaseOfferSourceString;
  }
}
